package forms;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;

import domain.CreditCard;



public class CustomerForm {
	// Constructor
		public CustomerForm() {
			super();
		}

		// Attributes
		private String username;
		private String password;
		private String repeatPassword;
		private String name;
		private String surname;
		private String email;
		private CreditCard creditCard;
		private Boolean acceptConditions;
		

		@NotBlank
		@Size(min = 5, max = 32)
		public String getUsername() {
			return username;
		}

		public void setUsername(String username) {
			this.username = username;
		}

		@NotBlank
		@Size(min = 5, max = 32)
		public String getPassword() {
			return password;
		}

		public void setPassword(String password) {
			this.password = password;
		}

		public String getRepeatPassword() {
			return repeatPassword;
		}

		public void setRepeatPassword(String repeatPassword) {
			this.repeatPassword = repeatPassword;
		}

		@NotBlank
		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		@NotBlank
		public String getSurname() {
			return surname;
		}

		public void setSurname(String surname) {
			this.surname = surname;
		}

		@NotBlank
		@Email
		public String getEmail() {
			return email;
		}

		public void setEmail(String email) {
			this.email = email;
		}

		public Boolean getAcceptConditions() {
			return acceptConditions;
		}

		public void setAcceptConditions(Boolean acceptConditions) {
			this.acceptConditions = acceptConditions;
		}
		
		@Valid
		@NotNull
		public CreditCard getCreditCard() {
			return creditCard;
		}

		public void setCreditCard(CreditCard creditCard) {
			this.creditCard = creditCard;
		}



}
